package com.newjiabo.ski.service;

import com.newjiabo.ski.domain.SkiOrder;
import com.newjiabo.ski.domain.enums.OrderStatusEnum;
import com.newjiabo.ski.domain.vo.OrderDetailInfoVo;

import java.util.Date;
import java.util.List;

/**
 * 订单Service接口
 *
 * @author CaoMengHui
 * @date 2023-09-22
 */
public interface ISkiOrderService {
    /**
     * 查询订单
     *
     * @param orderId 订单主键
     * @return 订单
     */
    SkiOrder selectSkiOrderByOrderId(String orderId);

    /**
     * 查询订单列表
     *
     * @param skiOrder 订单
     * @return 订单集合
     */
    List<SkiOrder> selectSkiOrderList(SkiOrder skiOrder);

    /**
     * 新增订单
     *
     * @param skiOrder 订单
     * @return 结果
     */
    int insertSkiOrder(SkiOrder skiOrder);

    /**
     * 修改订单
     *
     * @param skiOrder 订单
     * @return 结果
     */
    int updateSkiOrder(SkiOrder skiOrder);

    /**
     * 批量删除订单
     *
     * @param orderIds 需要删除的订单主键集合
     * @return 结果
     */
    int deleteSkiOrderByOrderIds(Long[] orderIds);

    /**
     * 删除订单信息
     *
     * @param orderId 订单主键
     * @return 结果
     */
    int deleteSkiOrderByOrderId(Long orderId);

    /**
     * 订单状态处理
     *
     * @param outTradeNo
     * @param transactionId
     * @param orderStatusEnum
     * @param successTime
     * @param payTotal
     * @return
     * @author CaoMengHui.
     * @date 2023/9/22 17:10
     */
    Boolean orderStatusHandle(String outTradeNo, String transactionId, OrderStatusEnum orderStatusEnum, Date successTime, double payTotal);

    /**
     * 获取订单详情
     *
     * @param orderId
     * @return
     * @author CaoMengHui.
     * @date 2023/9/25 10:14
     */
    OrderDetailInfoVo getInfoDetail(String orderId);


    /**
     * 更新
     *
     * @author CaoMengHui.
     * @date 2023/9/26 14:33
     * @param orderId
     * @param orderStatusEnum
     * @return
     */
    int updateStatusByOrderId(String orderId,OrderStatusEnum orderStatusEnum);

    /**
     * 完成订单，确认收货
     *
     * @author CaoMengHui.
     * @date 2023/10/12 17:04
     * @param orderId
     * @return
     */
    int completeOrder(String orderId);

}
